Merge branch 'better-window-sizes'
authorjustbur <justin@burkett.cc>
Thu, 9 Jul 2015 16:27:15 +0000 (12:27 -0400)
committerjustbur <justin@burkett.cc>
Thu, 9 Jul 2015 16:27:15 +0000 (12:27 -0400)
1  2 
which-key.el

diff --cc which-key.el
index 5c3f4214c4a1f9dcb8a0566ba3d881a58824f239,e36fcc60454ca54eaf086e4da31d613dd64306c4..66f940ccf1e59757e4e6bf9678627e9373309e96
@@@ -409,14 -440,16 +474,15 @@@ of the intended popup.
    (cons
     ;; height
     (if (member which-key-side-window-location '(left right))
 -       (- (frame-height) 1) ; 1 is for minibuffer
 -          ;; (window-height (minibuffer-window))
 +       (- (frame-height) (window-text-height (minibuffer-window)) 1) ;; 1 is a kludge to make sure there is no overlap
            ;; (window-mode-line-height which-key--window))
       ;; FIXME: change to something like (min which-*-height (calculate-max-height))
-      which-key-side-window-max-height)
+      (which-key/height-or-percentage-to-height which-key-side-window-max-height))
     ;; width
     (if (member which-key-side-window-location '(left right))
-        which-key-side-window-max-width
-      (frame-width))))
+        (which-key/total-width-to-text (which-key/width-or-percentage-to-width
+                                        which-key-side-window-max-width))
+      (window-width (frame-root-window)))))
  
  (defun which-key/frame-max-dimensions ()
    (cons which-key-frame-max-height which-key-frame-max-width))